<template>
	<view v-if="cont.title" :style="theme" class="container">
	  <image v-if="cont.img2" class="banner" :src="cont.img2" mode="widthFix"></image>
	  <view class="title">{{cont.title || ''}}</view>
	  <view class="cont"><u-parse :content="cont.info"></u-parse></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				noClick: true,
				id: '',
				cont: {}
			}
		},
		onLoad(ops) {
			this.id = ops.id
			this.getDetail()
		},
		methods: {
			jump(url, params, a) {
				this.$app.jump(url, params, a);
			},
			jump2(url, params, a) {
				this.$app.jump2(url, params, a);
			},
			getDetail() {
				this.$app.ajax({
					api: this.$api.infoWXKnowledge(),
					data: {
						userId: this.userInfo.id,
						param: {
							id: this.id
						}
					},
				}).then((res) => {
					if (res.errorCode === '000000') {
						this.cont = res.record
					} else {
						setTimeout(()=> {
							uni.navigateBack({
								delta:1
							})
						}, 500)
					}
				}).catch(() => {})
			}

		}

	}
</script>
<style scoped lang="scss">
	.banner {
	  width: 100%;
	  height: 400rpx;
	  overflow: hidden;
	}
	.title {
	  padding: 30rpx;
	  font-size: 32rpx;
	  font-weight: 500;
	  line-height: 1.5;
	}
	.cont{
	  padding: 0rpx 30rpx 30rpx;
	  box-sizing: border-box;
	}

</style>